package com.bs.service.impl;

import java.util.List;

import com.bs.dao.CategoryDao;
import com.bs.entity.MedicineCategory;
import com.bs.service.CategoryService;

/**
 * 药品类别service层处理类
 * @author Shimeimei
 *
 */
public class CategoryServiceImpl implements CategoryService {
	private CategoryDao categoryDao;

	public CategoryDao getCategoryDao() {
		return categoryDao;
	}

	public void setCategoryDao(CategoryDao categoryDao) {
		this.categoryDao = categoryDao;
	}
     /**
      * 增加药品类别
      */
	public boolean addMedicineCategory(MedicineCategory medicineCategory) {
		
		return categoryDao.addCategory(medicineCategory);
	}
   /**
    * 获取药品类别列表
    */
	public List<MedicineCategory> getAllMedicineCategory() {
		
		return categoryDao.getCategoryList();
	}

	public MedicineCategory getCategoryById(String id) {
		
		return categoryDao.getMedicineCategory(id);
	}

	public boolean editCategory(MedicineCategory medicineCategory) {
		
		return categoryDao.updateCategory(medicineCategory);
	}

	public boolean deleteCategory(MedicineCategory medicineCategory) {
	
		return categoryDao.deleteCategory(medicineCategory);
	}

	

}

